package training.controller.kadai.resultVoting;

//import java.util.List;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;

//import training.model.VoteResult;
import training.service.RegistService;

public class IndexController extends Controller {

    private RegistService service = new RegistService();

    @Override
    public Navigation run() throws Exception {

       // List<VoteResult> resultList = service.getVoteResultList();
        //それぞれのリストと投票回数セット
        /*requestScope("resultCount1", service.getResult(resultList,"犬"));
        requestScope("resultCount2", service.getResult(resultList,"猫"));
        requestScope("resultCount3", service.getResult(resultList,"鳥"));
        requestScope("resultList1", service.getComment(resultList, "犬"));
        requestScope("resultList2", service.getComment(resultList, "猫"));
        requestScope("resultList3", service.getComment(resultList, "鳥"));
        requestScope("resultCount21", service.getResult(resultList,"カレー"));
        requestScope("resultCount22", service.getResult(resultList,"ラーメン"));
        requestScope("resultCount23", service.getResult(resultList,"お寿司"));
        requestScope("resultList21", service.getComment(resultList, "カレー"));
        requestScope("resultList22", service.getComment(resultList, "ラーメン"));
        requestScope("resultList23", service.getComment(resultList, "お寿司"));
        requestScope("resultCount31", service.getResult(resultList,"ドラクエ"));
        requestScope("resultCount32", service.getResult(resultList,"FF"));
        requestScope("resultCount33", service.getResult(resultList,"ポケモン"));
        requestScope("resultList31", service.getComment(resultList, "ドラクエ"));
        requestScope("resultList32", service.getComment(resultList, "FF"));
        requestScope("resultList33", service.getComment(resultList, "ポケモン"));*/

        requestScope("resultCount1", service.getResult2("犬"));
        requestScope("resultCount2", service.getResult2("猫"));
        requestScope("resultCount3", service.getResult2("鳥"));
        requestScope("resultList1", service.getComment2("犬"));
        requestScope("resultList2", service.getComment2("猫"));
        requestScope("resultList3", service.getComment2("鳥"));
        requestScope("resultCount21", service.getResult2("カレー"));
        requestScope("resultCount22", service.getResult2("ラーメン"));
        requestScope("resultCount23", service.getResult2("お寿司"));
        requestScope("resultList21", service.getComment2("カレー"));
        requestScope("resultList22", service.getComment2("ラーメン"));
        requestScope("resultList23", service.getComment2("お寿司"));
        requestScope("resultCount31", service.getResult2("ドラクエ"));
        requestScope("resultCount32", service.getResult2("FF"));
        requestScope("resultCount33", service.getResult2("ポケモン"));
        requestScope("resultList31", service.getComment2("ドラクエ"));
        requestScope("resultList32", service.getComment2("FF"));
        requestScope("resultList33", service.getComment2("ポケモン"));
        return forward("index.jsp");
    }
}
